home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 8542 / 8542.xpi / chrome / lastpass.jar / content / search.js < prev    next >
Text File  |  2010-02-14  |  2KB  |  9 lines

  1. var tree;function window_load(D,A){D.title=LP.lpgs("LastPass Site Search");LP.sr(D,"searchlabel","value","Site Search");LP.sr(D,"searchBtn","label","Search");LP.sr(D,"clearBtn","label","Clear");LP.sr(D,"cancelBtn","label","Cancel");D.getElementById("tname").setAttribute("label",LP.lpgs("Name"));D.getElementById("tgroup").setAttribute("label",LP.lpgs("Group"));
  2. D.getElementById("tusername").setAttribute("label",LP.lpgs("Username"));D.getElementById("taction").setAttribute("label",LP.lpgs("Action"));tree=document.getElementById("tree");document.getElementById("lpsearchstr").focus();window.addEventListener("DOMMouseScroll",scroll,false);var B=window.arguments;
  3. if(B&&B.length>0&&typeof(B[0])!="undefined"){var E=B[0];var C=document.getElementById("lpsearchstr");if(C){C.value=E}LP.search_accept_click(document,window)}else{LP.search_accept_click(document,window)}if(LP.lpis_mac){document.getElementById("cancelBtn").removeAttribute("hidden")}}function cancel_click(){var A=document.getElementById("LPSearch");
  4. A.cancelDialog()}function clear_click(){var A=document.getElementById("lpsearchstr");if(A){A.value=""}LP.search_accept_click(document,window)}function scroll(B){if(tree!=B.target){var A=document.createEvent("MouseScrollEvents");A.initMouseEvent(B.type,B.bubbles,B.cancelable,B.view,B.detail,B.screenX,B.screenY,B.clientX,B.clientY,B.ctrlKey,B.altKey,B.shiftKey,B.metaKey,B.button,B.relatedTarget);
  5. tree.dispatchEvent(A)}}function onTreeClicked(A){var J=document.getElementById("tree");var E=J.treeBoxObject;var I={},D={},C={};E.getCellAt(A.clientX,A.clientY,I,D,C);try{var G=J.view.getCellText(I.value,D.value);var F=J.view.getItemAtIndex(I.value);var B=F.getAttribute("id");if(LP.lpgs("Edit")==G||LP.is_secure_note(B)){LP.lpOpenEditWindow(B,0,0,window)
  6. }else{LP.lpLaunchUrl(B,1,0);document.getElementById("LPSearch").cancelDialog()}}catch(H){}}function sort(D){var B;var A=tree.getAttribute("sortDirection")=="ascending"?1:-1;if(D){B=D.id;if(tree.getAttribute("sortResource")==B){A*=-1}}else{B=tree.getAttribute("sortResource")}tree.setAttribute("sortDirection",A==1?"ascending":"descending");
  7. tree.setAttribute("sortResource",B);var E=tree.getElementsByTagName("treecol");for(var C=0;C<E.length;C++){E[C].removeAttribute("sortDirection")}document.getElementById(B).setAttribute("sortDirection",A==1?"ascending":"descending");LP.search_accept_click(document,window)}function prepareForComparison(A){if(typeof A=="string"){return A.toLowerCase()
  8. }return A};
  9.